<?php
namespace app\common\validate\Depot;

use think\Validate;

// 购物车
class Supplier extends Validate
{
    protected $rule =   [
        'name'   => ['require'],
        'mobile' => ['require','number','unique:business','regex:/(^1[3|4|5|7|8|9][0-9]{9}$)/'],
        'province'   => ['require'],
        'city'   => ['require'],
        'district'   => ['require'],
        'address' => ['require']
    ];

    protected $message  =   [
        'name.require'     => '供应商名称必填',
        'mobile.require' => '手机号必填',
        'mobile.unique' => '手机号已存在',
        'mobile.regex' => '手机号码格式不正确',
        'province.require'     => '省份必填',
        'city.require'     => '城市必填',
        'district.require'     => '区域必填',
        'address.require' => '详细地址必填'
    ];

    /**
     * 设置验证器的场景
     */
    protected $scene = [
       
    ];
}